Q Ê 1 Ê What are threads ? A Ê A thread is light weight process ,an independent path of execution within a program. Q Ê 2 Ê Difference btw Thread and process ? A Ê 1) Threads share memory among themselves, Processes have seperate memory. 2) Threads can communicate directly. Processes should use Inter Process Communication Q Ê 3 Ê Why are threads called light weight process? A Ê Since threads share memory among them they are light weight process. Q Ê 4 Ê Are threads platform independent? A Ê No they are dependent on the platform as to how it implements the threads. especially the scheduling part of it. Q Ê 5 Ê Can start() be overridden ? If yes what all things need to be taken care of? A Ê Yes start can be overridden, a) It should instantiate and register our new thread with thread scheduler. b) it should call run() method. Q Ê 6 Ê What are the differnt types of threads A Ê Deamon Thread : which runs in the background NonDeamon : runs in the foreground Q Ê 7 Ê What are the scenarios when we will use an ArrayList and a vector. A Ê ArrayList is not thread safe where as Vector is. Q Ê 8 Ê what is a daemon thread? A Ê The thread which executes at the background is deamon thread you can make a thread deamon by invoking Thread.setDeamon(true) Q Ê 9 Ê How do we make sure that main thread ends only after all child threads are done? A Ê using thread.join method when this is done the main thread waits till all the threads comeplete. Q Ê 10 Ê How is implementing runnable different from extending threads? A Ê Runnable is good when you have to implement or extend another Interface/Class Thread is an implementation of Runnable ,which has some methods like interrupt which are implemented. Q Ê 11 Ê Synchronization ? A Ê When two threads access a critical resource they need an effective way to communicate with each other which is achieved through synchronized keyword. Q Ê 12 Ê How do threads communicate with each other? A Ê Using wait,notify,notifyall Q Ê 13 Ê Thread Priority A Ê the higher the prority the more probability the thread gets the processor, the priority can be set using setPriority(int Level) method The MAX prority is 10 and min is 1 the default is 5